package com.zenika.training.wicket.zencontact.pages;

import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.resources.StyleSheetReference;

import com.zenika.training.wicket.zencontact.ZenContactSession;
import com.zenika.training.wicket.zencontact.panel.MenuPanel;
import com.zenika.training.wicket.zencontact.panel.SearchPanel;

public abstract class ZenContactBasePage extends WebPage {

	protected SearchPanel searchPanel;

	public ZenContactBasePage() {
		add(new StyleSheetReference("stylesheet", ZenContactBasePage.class, "zencontact.css"));
		add(new Label("title", getPageTitle()));
		add(new MenuPanel("menuPanel"));
		add(searchPanel = new SearchPanel("searchPanel"));
	}

	protected abstract String getPageTitle();

	protected ZenContactSession getZenContactSession() {
		return (ZenContactSession) getSession();
	}
}
